import {READMODEL} from './actionType'
import { get } from '@u/http'

const loadSync =list=>{
    return{
        type: READMODEL,
        list
    }
} 

const loadAsync = (v)=>{

    // console.log(v);
    return async dispatch=>{
        let result = await get({
            url:`/api/zuoye/huiben?mkId=1&dyId=1&uId=1&search=${v? v :'' }`
        })
        dispatch( loadSync(result.data.huiBens ))
    }
}

export {
    loadSync,
    loadAsync
}